#ifndef _CRT_COND_H_
#define _CRT_COND_H_

#include <crt_define.h>

#ifdef	__cplusplus
extern "C" 
{
#endif

#define WAIT_TIME_RELATIVE 1
/*
_cond_init(&code�� WAIT_TIME_RELATIVE) ==> _cond_timedwait  use CLOCK_MONOTONIC

_cond_init(&code�� 0) ==> _cond_timedwait  use CLOCK_REALTIME

*/


int		_cond_init(_cond_t* cond, int relative);
void	_cond_destroy(_cond_t* cond);
void	_cond_signal(_cond_t* cond);
void	_cond_broadcast(_cond_t* cond);
void	_cond_wait(_cond_t* cond, _mutex_t* mutex);
int		_cond_timedwait(_cond_t* cond, _mutex_t* mutex, unsigned long ms);


#ifdef	__cplusplus
}
#endif

#endif


